package com.deeper.customview.ui.c4.exercise.c04e04;

import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.deeper.customview.BaseFragment;
import com.deeper.customview.R;

public class Chapter04Exercise04Fragment extends BaseFragment {

    private CirclePhotoView circlePhotoView;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.fragment_chapter04_exercise04, container, false);
        circlePhotoView = root.findViewById(R.id.circleBmp);
        circlePhotoView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                circlePhotoView.setBitmap(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
            }
        });
        return root;
    }
}
